


HttpResponsePtr createJsonResponse(Json::Value data, HttpStatusCode code = k200OK) {
    auto resp = HttpResponse::newHttpJsonResponse(data);
    resp->setStatusCode(code);
    return resp;
}

HttpResponsePtr createTextResponse(const std::string& body, HttpStatusCode code = k200OK) {
    auto resp = HttpResponse::newHttpResponse();
    resp->setBody(body);
    resp->setStatusCode(code);
    return resp;
}